package com.zzj.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 业务操作日志
 * </p>
 *
 * @author zzj
 * @since 2023-11-14
 */
@Getter
@Setter
@Schema(name = "Log", description = "$!{table.comment}")
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "操作名称")
    private String name;

    @Schema(description = "操作描述")
    private String description;

    @Schema(description = "操作时间")
    private Long startTime;

    @Schema(description = "消耗时间")
    private Integer timeCost;

    @Schema(description = "URL")
    private String url;

    @Schema(description = "URI")
    private String uri;

    @Schema(description = "请求类型")
    private String httpMethod;

    @Schema(description = "IP地址")
    private String ipAddress;

    @Schema(description = "请求参数")
    private String params;

    @Schema(description = "请求返回结果")
    private String result;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
